<template>
  <div class="container">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item
      v-for="(item, index) in imgList"
      :key="index"
      >
      <img v-lazy="item.url" alt="">
      </van-swipe-item>
    </van-swipe>
    <h1>1</h1>
    <NLink to="/about">About Page</NLink>
  </div>
</template>

<script>
import { resourceServices } from '../api'
export default {
  data () {
    return {
      imgList: [
        {
          url: require('../static/img/1jpg.jpg')
        },
        {
          url: require('../static/img/2jpg.jpg')
        },
        {
          url: require('../static/img/3jpg.jpg')
        }
      ]
    }
  },
  head () {
    return {
      title: '九星斗者',
      meta: [
        {
          name: '最强王者',
          content: '最强王者,今晚吃鸡'
        }
      ]
    }
  },
  methods: {
    async init () {
      let { code, data, message } = await resourceServices.getUserBook()
      if (code === '200') {
        console.log(data)
      }
    }
  },
  asyncData ({app}) {
   
  },
  mounted () {
    // this.init()
  }
}
</script>

<style scoped>
.container{
  font-size: 20px;
  text-align: center;
  padding-top: 100px;
}
.my-swipe img{
  width: 100%;
  height: 120px;
}
</style>
